<template>
  <div class="alarm-management">
    <div class="secondary-toolbar">
      <span>时间选择 : </span>
      <div class="layoutBox" style="width:100px">
        <el-date-picker v-model="dateRange" type="month" placeholder="请选择"></el-date-picker>
      </div>&emsp;&emsp;
      <el-button><i class="iconfont icon-sousuo"></i>查询</el-button>
      <el-button type='delet'><i class="iconfont icon-daochu"></i>导出</el-button>
    </div>
   
    <div class="alarm-modular modular-box">
      <div class="modular-head">
        <span class="title">考核列表</span>
        <div class="modular-toolbar">
          <div class="state-radio-wrap">
            <el-radio-group v-model="stateRadio" size="small">
              <el-radio-button label="1">全部</el-radio-button>
              <el-radio-button label="2">考评中</el-radio-button>
              <el-radio-button label="3">已入档</el-radio-button>
            </el-radio-group>
          </div>
          <div class="search-box" style="width: 164px;">
            <i class="iconfont icon-sousuo"></i>
            <input type="text" class="search-input" placeholder="请输入"/>
          </div>
        </div>
      </div>
      <div class="modular-body">
            <el-table border  :data="tableData" height="calc(100% - 37px)">
                  <el-table-column
                    type="index"
                    :index="indexMethod"
                    label="序号"
                    width="50">
                  </el-table-column>
                  <el-table-column
                    prop="company"
                    label="姓名">
                  </el-table-column>
                  <el-table-column
                    prop="company"
                    label="岗位">
                  </el-table-column>
                     <el-table-column
                    prop="company"
                    label="负责站点数">
                  </el-table-column>
                  <el-table-column
                    prop="company"
                    label="负责设备数">
                  </el-table-column>
                  <el-table-column
                    prop="company"
                    label="运营证书">
                  </el-table-column>
                   <el-table-column
                    prop="company"
                    label="学历">
                  </el-table-column>
                  <el-table-column
                    prop="company"
                    label="电话">
                  </el-table-column>
                  <el-table-column
                    prop="company"
                    label="入职时间">
                  </el-table-column>
                   <el-table-column
                    prop="company"
                    label="考核节点">
                  </el-table-column>
                   <el-table-column
                    prop="company"
                    label="当前得分">
                  </el-table-column>
                   <el-table-column
                    prop="company"
                    label="评分等级">
                  </el-table-column>
                   <el-table-column
                    prop="company"
                    label="考核状态">
                  </el-table-column>
            </el-table>
            <div class="table-pagination-wrap">
              <el-pagination
                @size-change="paginationSizeChange"
                @current-change="paginationChange"
                :current-page.sync="currentPage"
                :page-size="pageSize"
                popper-class="select-pagination-option"
                background
                :small="true"
                :page-sizes="pageList"
                layout="total, sizes, slot,->,prev, pager, next, jumper"
                :total="total">
                <template v-slot:default>
                  <span class="el-pagination__current">当前第{{ currentPage }}/{{totalPageNumber}}页</span>
                </template>
              </el-pagination>
            </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'alarmManage',
  data(){
    return{
      dateRange:'',
      typeSelect:'',
      optionData:[],
      duration:'',
      stateRadio: 1,
      tableData:[{}],
      currentPage: 1, //分页组件当前页
      total: 200, //分页总条数
      pageSize: 10, //分页每页多少条数据
      pageList: [10, 15, 20] //设置每页多少条
    }
  },
  created(){
    this.$store.commit("setShowlefttree", false);
  },
  methods:{
     indexMethod(index) {
      return index + 1;
    },
    paginationSizeChange(){

    },
    paginationChange(){

    }
  },
   computed: {
    totalPageNumber() {
      //计算总页数
      let number = 0;
      number = Math.ceil(this.total / this.pageSize);
      return number;
    }
  },
}
</script>

<style scoped lang="less">
.alarm-management{
  height: 100%;
  
  .alarm-modular{
    height: calc(100% - 55px);
    margin-top: 6px;
    .modular-toolbar{
      float: right;
    }
  }
}
.modular-box{
  border: 1px solid #dce9fa;
  .modular-head{
    padding: 7px 12px;
    border-bottom: 1px solid #dce9fa;
    line-height: 30px;
    .title{
      font-size: 16px;
    }
    .title:before{
      content:'';
      display: inline-block;
      width: 3px;
      height: 10px;
      background: #166bce;
      margin: 0 6px 1px 0;
    }
  }
  .modular-body{
    height: calc(100% - 45px);
    padding: 6px;
  }
}
.state-radio-wrap{
  display: inline-block;
  vertical-align: top;
}
.search-box{
  display: inline-block;
  vertical-align: top;
  position: relative;

  height: 30px;
  line-height: 30px;
  .icon-sousuo{
    position: absolute;
    right: 10px;
    top: 0;
    color: #7c8fa4;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
  }
  .icon-sousuo:hover{
    color: #166bce;
  }
  .icon-sousuo:active{
    color: #1056a7;
  }
  .search-input{
    position: absolute;
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    top: 0;
    left: 0;
    padding-left: 5px;
    padding-right: 32px;
    outline: none;
    border: 1px solid #c6d1de;
  }
}
</style>
